function sub(){
    var uid = $("#uid").val();
    var name = $("#name").val();
    var email = $("#email").val();
    var password = $("#password").val();

    if (uid == '') {
        $("#txt").html("手机号不能空");
        return
    }
    var reg = /^(((1[0-9]{2}))+\d{8})$/;if (!uid.match(reg)) {
        $("#txt").html("您的手机号输入有误");
        return;
    }

    if (name == '') {
        $("#txt").html("姓名不能空");
        return;
    }
    if (email == '') {
        $("#txt").html("email不能空");
        return;
    }
    var reg = /\w+[@]{1}\w+[.]\w+/;
    if (!email.match(reg)) {
        $("#txt").html("邮箱格式不正确");
        return;
    }
    if (password == '') {
        $("#txt").html("密码不能空");
        return;
    }
    if(password.length>15 || password.length<6){
        $("#txt").html("请填写6到15位密码");
        return;
    }
    $("#txt").html("");
    $.ajax({
        type:'post',
        url:'/auth/registe',
        data:{
            uid:uid,
            name:name,
            email:email,
            password:password
        },
        dataType:'json',
        success: function(ret){
            console.log(ret)
        }
    });
}